package chap2;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class ScoreStat2 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入这位同学的名字:");
        String name=sc.next();
        System.out.print("请输入"+name+"的java成绩：");
        int javaScore=sc.nextInt();
        System.out.print("请输入 "+name+ "的sql成绩：");
        int sqlScore=sc.nextInt();
        System.out.print("请输入"+name+"的stb的成绩：");
        int stb=sc.nextInt();
        int avg=(javaScore+sqlScore+stb)/3;
        int diff=javaScore-sqlScore;
        System.out.println("三门课的平均分是："+avg);
        System.out.println("java和Sql的成绩差是"+diff);
    }
}
